/*
 * EfficientSoftApp.java
 */

package com.igorov.efficientsoft.application.desktopapplication;

import com.nilo.plaf.nimrod.NimRODLookAndFeel;
import com.nilo.plaf.nimrod.NimRODTheme;
import javax.swing.UIManager;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
import javax.swing.SwingUtilities;

/**
 * The main class of the application.
 */
public class EfficientSoftApp extends SingleFrameApplication {

    /**
     * At startup create and show the main frame of the application.
     */
    @Override protected void startup() {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                try {
                    NimRODTheme nt = new NimRODTheme("tema.theme");
                    
                    NimRODLookAndFeel nf = new NimRODLookAndFeel();
                    nf.setCurrentTheme( nt);
                    UIManager.setLookAndFeel( nf);

                } catch (Exception e) {
                    System.out.println("Substance Graphite failed to initialize");
                }
            }
        });
        show(new EfficientSoftView(this));
    }

    /**
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
     */
    @Override protected void configureWindow(java.awt.Window root) {
    }

    /**
     * A convenient static getter for the application instance.
     * @return the instance of EfficientSoftApp
     */
    public static EfficientSoftApp getApplication() {
        return Application.getInstance(EfficientSoftApp.class);
    }

    /**
     * Main method launching the application.
     */
    public static void main(String[] args) {
        launch(EfficientSoftApp.class, args);
    }
}
